app.controller("questionDetail",['$scope','$state','service',function($scope,$state,service){
    console.log($state.params);
    service.get($scope.host+"/Course/questionDetail/"+$state.params.id,'',function(data){
        console.log(data);
        $scope.data=data;
    })
    $scope.postForm=function(){
        service.post("form",$scope.host+"/Course/answer/"+$state.params.id,function(data){
            $scope.data.answers=data;
            $scope.$apply();
        })
    }
}])